package com.kuang.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {

    @GetMapping("/t1")
    public String test1(String name, Model model){
        //1.接收前端参数
        System.out.println("前端传的值是" + name);
        //2.将处理的结果返回前端
        model.addAttribute("msg",name);
        return "test";
    }
}
